package service.impl;

import dao.CommodityDao;
import entity.Commodity;
import org.springframework.stereotype.Service;
import service.CommodityService;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Service("commodityService")

public class Commodityimpl implements CommodityService {
    @Resource(name="commodityDao")
    private CommodityDao commodityDao;

    @Override
    public List<Commodity> list() {
        return commodityDao.list();
    }

    @Override
    public int count(Commodity commodity) {
        return commodityDao.count(commodity);
    }

    @Override
    public List<Commodity> queryByName(Map<String, Object> map) {
        return commodityDao.queryByName(map);
    }


    @Override
    public List<Commodity> QqueryList(Map<String,Object> map) {
        return commodityDao.QqueryList(map);
    }

    @Override
    public int chanumber() {
        return commodityDao.chanumber();
    }

    @Override
    public Commodity cha(Commodity commodity) {
        return commodityDao.cha(commodity);
    }

    @Override
    public int add(Commodity commodity) {
        return commodityDao.add(commodity);
    }

    @Override
    public int upd(Commodity commodity) {
        return commodityDao.upd(commodity);
    }

    @Override
    public int upd2(Commodity commodity) {
        return commodityDao.upd2(commodity);
    }

    @Override
    public Commodity chanumber1(String number) {
        return commodityDao.chanumber1(number);
    }

}
